****
*run using Stata/MP 17.0 for Windows (64-bit x86-64)
****

**Replace "FODLER" with you folder location
local root_dir = "[FOLDER]"
cd "`root_dir'"

**********
****DATA PREPARATION**
*********

**Except for Gallup data, you will need to download the data yourself:

https://www.google.com/covid19/mobility/
https://www.healthdata.org/node/7425
https://github.com/OxCGRT/covid-policy-tracker

**Clean data for preliminary analysis with micro and macro-level data
do "HSSC replication code\data cleaning\Google Mobility cumulative-to-date by month.do"
do "HSSC replication code\data cleaning\IHME Excess Deaths--Cumulative to date.do"
do "HSSC replication code\data cleaning\Oxford cumulative-to-date by month.do"
do "HSSC replication code\data cleaning\Prepare Gallup microdata.do"

**Clean data for country-level summary statistics in supplement
do "HSSC replication code\data cleaning\Google Mobility Data--through March 2021.do"
do "HSSC replication code\data cleaning\IHME Excess Deaths--through March 2021.do"
do "HSSC replication code\data cleaning\Oxford Data-cumulative.do"

*********
**Analysis
***********

*Main text

*First findings on wellbeing and harm
"HSSC replication code\analysis\Secondary findings--wellbeing and harm--from microdata.do"
*Primary findings using multi-level models and testing for policy heterogeneity
"HSSC replication code\analysis\Primary findings--Multi-level models.do"
*SES and stringency--interaction models
"HSSC replication code\analysis\Plot-multi-level interactions.do"

*Supplement

*correlation plots and summary data at sub-regional level
do "HSSC replication code\analysis\HSSC-Cumulative country level summary.do"
*2SLS model
do "HSSC replication code\analysis\Supplemental finding--US State Data and analysis.do"
